package cn.liberals.system.mapper;

import cn.liberals.system.domain.Role;
import cn.liberals.basic.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author liberals
 * @since 2022-07-11
 */
public interface RoleMapper extends BaseMapper<Role> {

    void removeRoleMenu(Long rid);

    void removeRolePermission(Long rid);

    // 批量新增对应的菜单数据
    void saveRoleMenu(@Param("rid") Long rid, @Param("menus") List<Long> menus);

    // 批量新增角色对应的权限数据
    void savePermission(@Param("rid") Long rId, @Param("permissions") List<Long> permissions);
}
